<template lang="pug">
  .native-radio
    input.radio-input(type="radio", :value="worth", v-model="model")
    i.iconfont.radio-icon(:class="model === worth ? 'checked icon-danxuankuangyixuan' : 'unchecked icon-weixuanze'")
</template>

<script>
export default {
  props: {
    value: {},
    worth: {}
  },
  computed: {
    model: {
      get () {
        return this.value
      },
      set (val) {
        this.$emit('input', val)
      }
    }
  }
}
</script>

<style scoped lang="stylus">
  .native-radio
    position relative
    margin-right 10px
    display inline-block
  .radio-input
    position absolute
    width 16px
    height 16px
    left 0
    opacity 0
    cursor pointer
    z-index 11
  .radio-icon
    color #b7b7b7
    font-size 14px
    &.checked
      color #0085d0
</style>
